package com.icarsaas.saas.tenant.system.repository;

import org.springframework.stereotype.Repository;

import com.icarsaas.saas.component.base.MyBaseRepository;
import com.icarsaas.saas.component.base.MyBaseRepositoryImpl;
import com.icarsaas.saas.tenant.system.model.Dict;

public interface DictRepository extends DictRepositoryCustom, BaseRepository<Dict, Long> {

    /**
     * 根据字典标识查询
     * @param name 字典标识
     * @param status 状态
     * @return 字典信息
     */
    public Dict findByNameAndStatus(String name, Byte status);

    /**
     * 根据标识查询字典数据,且排查指定ID的字典
     * @param name 字典标识
     * @param id 字典ID
     * @return 字典信息
     */
    public Dict findByNameAndIdNot(String name, Long id);
}

/* 自定义接口
 */
interface DictRepositoryCustom extends MyBaseRepository<Dict, String> {

}
@Repository
class DictRepositoryImpl extends MyBaseRepositoryImpl<Dict, String> implements DictRepositoryCustom {
	
}
